package com.yuexunit.finance.project.action.v1.model.output;

import java.math.BigDecimal;

import com.yuexunit.web.annotation.Parameter;

/**
*@version 创建时间：2017年10月18日 上午9:37:58
*@author wenwenlong
*类说明
*/

public class ProductRankingDetail implements Comparable<ProductRankingDetail>{
	@Parameter(name = "name", description = "排行因素")
	private String name;
	
	@Parameter(name = "value1", description = "排行数据1")
	private BigDecimal value1;
	
	@Parameter(name = "value2", description = "排行数据2")
	private BigDecimal value2;
	
	@Parameter(name = "value3", description = "排行数据2")
	private BigDecimal value3;
	
	@Parameter(name = "value4", description = "排行数据2")
	private BigDecimal value4;
	
	@Parameter(name = "value5", description = "排行数据2")
	private BigDecimal value5;
	
	@Parameter(name = "value6", description = "排行数据2")
	private BigDecimal value6;
	
	@Parameter(name = "sum", description = "总和")
	private BigDecimal sum;

	public ProductRankingDetail() {
		this.setValue1(BigDecimal.ZERO);
		this.setValue2(BigDecimal.ZERO);
		this.setValue3(BigDecimal.ZERO);
		this.setValue4(BigDecimal.ZERO);
		this.setValue5(BigDecimal.ZERO);
		this.setValue6(BigDecimal.ZERO);
	}

	public BigDecimal getSum() {
		return value1.add(value2).add(value3).add(value4).add(value5).add(value6);
	}

	public void setSum(BigDecimal sum) {
		this.sum = sum;
	}

	public BigDecimal getValue3() {
		return value3;
	}

	public void setValue3(BigDecimal value3) {
		this.value3 = value3;
	}

	public BigDecimal getValue4() {
		return value4;
	}

	public void setValue4(BigDecimal value4) {
		this.value4 = value4;
	}

	public BigDecimal getValue5() {
		return value5;
	}

	public void setValue5(BigDecimal value5) {
		this.value5 = value5;
	}

	public BigDecimal getValue6() {
		return value6;
	}

	public void setValue6(BigDecimal value6) {
		this.value6 = value6;
	}

	public BigDecimal getValue1() {
		return value1;
	}

	public void setValue1(BigDecimal value1) {
		this.value1 = value1;
	}

	public BigDecimal getValue2() {
		return value2;
	}

	public void setValue2(BigDecimal value2) {
		this.value2 = value2;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Override
	public String toString() {
		return "ProductRankingDetail [name=" + name + ", value1=" + value1
				+ ", value2=" + value2 + "]";
	}

	 @Override  
    public int compareTo(ProductRankingDetail o) {  
        int i = new Integer(this.name) - new Integer(o.name);//先按照年龄排序  
        return i;  
    }  
}
